<?php
 /******************************************************************************
 *   GunCMS is an avid supporter of open source software. This is the appropriate 
 *   option if you are creating an open source application with a license 
 *   compatible with the GNU GPL license v3.
 *   For details http://www.gnu.org/licenses/gpl.html
 *   DO NOT USE FOR COMMERCIAL WITHOUT PERMISSION
 *
 * GunCMS Version 1.0.3
 * Copyright(c) 2009-2010, T & L GdbR
 * info@guncms.de
 * 
 * http://www.guncms.de
 ********************************************************************************/
class FgcmsBanner {
	var $db;
 	var $smarty;	
	public function __construct($db, $smarty) {
		$this->db = $db;
		$this->smarty = $smarty;
	}
	
	public function view_banner() {
		if(isset($_GET['subcat']) && $_GET['subcat'] != "")
			$id = $_GET['subcat'];
		else if(isset($_GET['cat']) && $_GET['cat'] != "")
			$id = $_GET['cat'];	
		$cat = FgcmsCategoryBean::get_banner_by_id($this->db,$id);
		
		$this->smarty->assign('BANNER',$cat->banner_path);	
	}
	
}
?>
